package org.zjx.enums;


public enum FontAttribute {
    LOCATION("location", 1),
    NPC("npc", 2),
    PROP("prop", 3),
    SPECIAL("special", 4),
    TASKBAR("taskbar", 5),
    LIN("lin", 6);

    private final String name;
    private final int type;

    FontAttribute(String name, int type) {
        this.name = name;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public int getType() {
        return type;
    }

    public static int fontType(String fontName) {
        for (FontAttribute attr : values()) {
            if (attr.name.equals(fontName)) {
                return attr.type;
            }
        }
        return 0;
    }
}